'Copyright (c) 2008, Jonathan Allen


Public Class RentalHistoryItem
    Inherits CatalogTitle

    Public Sub New(ByVal connection As NetflixConnection, ByVal source As XElement)
        MyBase.New(connection, source)
    End Sub

    Public ReadOnly Property WatchedDate() As Date
        Get
            Return ClrExtensions.FromUnixTime(CLng(Source.<watched_date>.Value))
        End Get
    End Property

    Public ReadOnly Property ViewedTime() As TimeSpan
        Get
            TimeSpan.Parse(Source.<viewed_time>.Value)
        End Get
    End Property

    Public ReadOnly Property EpisodeShortTitle() As String
        Get
            Return Source.<title>.@episode_short
        End Get
    End Property

    Public ReadOnly Property Updated() As DateTime
        Get
            Return ClrExtensions.FromUnixTime(CLng(Source.<updated>.Value))
        End Get
    End Property

End Class
